package com.smedi.ismedi.inmail.core.domain.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.inmail.core.application.query.vo.AnnouncementManagementQueryVo;
import com.smedi.ismedi.inmail.core.domain.aggregatemodel.announcement.Announcement;
import com.smedi.ismedi.inmail.core.domain.aggregatemodel.announcement.QueriedCriteria;
import com.smedi.ismedi.inmail.core.domain.dto.AnnouncementQuery;

import java.util.List;

/**
 * 业务服务接口
 *
 * @author niuyanling
 * @date 2021/7/27
 */
public interface AnnouncementDomainService {

    /**
     * 保存通知公告
     *
     * @param announcement 通知公告
     * @return Announcement
     */
    Announcement saveAnnouncement(Announcement announcement);

    /**
     * 单一查询
     *
     * @param announcementQuery 查询条件
     * @return Page<AnnouncementManagementQueryVo>
     */
    Announcement getAnnouncementOne(AnnouncementQuery announcementQuery);

    /**
     * 删除通知公告
     *
     * @param announcementQuery 查询条件
     * @return Page<AnnouncementManagementQueryVo>
     */
    void removeAnnouncement(AnnouncementQuery announcementQuery);

    /**
     * 主体院管理查询
     *
     * @param criteria        是否为条件查询
     * @param queriedCriteria 查询条件
     * @return Page<AnnouncementManagementQueryVo>
     */
    Page<AnnouncementManagementQueryVo> queryAnnouncementByOrganizationManager(Boolean criteria, QueriedCriteria queriedCriteria);

    /**
     * 项目管理人查询
     *
     * @param criteria        是否为条件查询
     * @param projectNameList  负责的项目名称列表篇
     * @param queriedCriteria 查询条件
     * @return Page<AnnouncementManagementQueryVo>
     */
    Page<AnnouncementManagementQueryVo> queryAnnouncementByProjectManager(Boolean criteria, List<String> projectNameList, QueriedCriteria queriedCriteria);

    /**
     * 个人查询
     *
     * @param criteria        是否为条件查询
     * @param queriedCriteria 查询条件
     * @return Page<Announcement>
     */
    Page<Announcement> queryAnnouncementByNormalUser(Boolean criteria, QueriedCriteria queriedCriteria);
}